import java.util.*;

public class StudentRepository {
    private final Map<String, Student> studentMap = new HashMap<>();

    public void saveAll(List<Student> students) {
        for (Student s : students) {
            studentMap.put(s.getId(), s);
        }
    }

    public boolean exists(String studentId) {
        return studentMap.containsKey(studentId);
    }

    public Collection<Student> findAll() {
        return studentMap.values();
    }
}
